<template>
  <div class="article-detail-container">
    <div class="arctive_title">{{ detail.title }}</div>
    <div class="arctive_date">{{ detail.createTime }}</div>
    <div class="detail" v-html="detail.content" />
  </div>
</template>

<script>
import { detail } from '@/api/data'
export default {
  name: 'ArticleDetail',
  data() {
    return {
      detail: detail.data
    }
  },
  created() {
    console.log('this.$route.params.id: ', this.$route.params.id)
    console.log('detail: ', detail)
  }
}
</script>

<style lang="scss" scoped>
.article-detail-container {
  padding: 20px 16px 12px;
  text-align: left;
  .arctive_title {
    font-size: 19px;
    font-weight: 700;
    color: #333;
    line-height: 28px;
    height: 30px;
    line-height: 30px;
  }
  .arctive_date {
    font-size: 13px;
    font-weight: 500;
    color: #999;
    margin: 15px 0;
    padding-bottom: 10px;
    border-bottom: .5px solid #eee;
    line-height: 18px;
  }
  .detail {
    width: 100%;
    background: #fff;
    overflow-x: hidden;
    word-wrap: break-word;
    white-space: pre-wrap;
    box-sizing: border-box;
    font-size: 18px;
    ::v-deep p {
      line-height: 30px !important;
      margin: 10px 0;
      img {
        width: 100%;
        text-indent: 0 !important;
      }
    }
  }
}
</style>
